<div class="content certificate">
	<form class="form-horizontal" name="serviceForm" ng-submit="vm.submitForm(serviceForm.$valid)" novalidate>
		<div class="ibox">
            <div class="ibox-title">
                <h5>证书服务</h5>
            </div>
            <div class="ibox-content text-danger" ng-show="!vm.certificateservice">
                您尚未开通证书服务，请到赛事详情页面设置开通证书服务。
            </div>
            <div class="ibox-content" ng-show="vm.certificateservice">
                <div class="form-group">
                    <label class="col-lg-3 control-label">科目 <b class="text-danger">*</b></label>
                    <div class="col-lg-3">
                        <select id="select" class="form-control" ng-model="vm.service.course" ng-options="item.course_name for item in vm.courselist" ng-change="vm.getScoresms(vm.service.course.course_id)" required>  
                            <option value="">请选择科目</option>  
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-3 control-label">上传证书</label>
                    <div class="col-lg-8">
                        <div class="upload-logo bg">
                            <img ng-src="{{vm.imageSrc2}}" id="act_image" ng-show="vm.imageSrc2">
                            <input class="input-file" type="file" name="image" file-model="vm.myFile2" file-fn="vm.getFile2()" required>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-lg-offset-3 col-lg-6" ng-show="vm.certificate">
                        <button class="btn btn-sm btn-primary"><i class="fa fa-save"></i>更改证书</button>
                        <a ng-href="{{vm.previewLink}}" target="_blank" class="btn btn-sm btn-primary" ng-show="vm.previewFlag">预览证书</a>
                        <span class="btn btn-sm btn-primary" ng-click="vm.edit()">编辑证书</span>
                        <span class="btn btn-sm btn-primary" ng-click="vm.delete()">删除证书</span>
                        <span><br>更改证书：点击证书图片，重新选择要上传的证书，点击更改证书，进行进行更改证书模板。<b class="text-danger">*</b></span>
                        <span ng-show="vm.previewFlag"><br>预览证书：证书已经编辑过，点击预览证书进行证书的预览 <b class="text-danger">*</b></span>
                        <span ng-show="!vm.previewFlag"><br>编辑证书：您未编辑过证书，点击编辑证书进行证书的编辑 <b class="text-danger">*</b></span>
                        <span ng-show="vm.previewFlag"><br>编辑证书：您已编辑过证书，点击编辑证书重新编辑 <b class="text-danger">*</b></span>
                        <span><br>删除证书：点击删除证书，删除证书及证书的编辑内容 <b class="text-danger">*</b></span>
                    </div>
                    <div class="col-lg-offset-3 col-lg-6" ng-show="!vm.certificate">
                        <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-save"></i>保存证书</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>